#ifndef SKYID_WINDOW_EVENT_H 
#define SKYID_WINDOW_EVENT_H

#include "common.h"

namespace SkyID 
{

//- KeyCode -------------------------------------------------------------------

enum KeyCode
{
	KEY_UNKNOWN = 0,
	KEY_FIRST = 0,

	KEY_RETURN = 13,
	KEY_PAUSE = 19,
	KEY_ESCAPE = 27,
	KEY_SPACE = 32,

	KEY_UP = 273,
	KEY_DOWN = 274,
	KEY_RIGHT = 275,
	KEY_LEFT = 276,

	KEY_NUMLOCK = 300,
	KEY_CAPSLOCK = 301,
	KEY_SCROLLOCK = 302,
	KEY_RSHIFT = 303,
	KEY_LSHIFT = 304,
	KEY_RCTRL = 305,
	KEY_LCTRL = 306,
	KEY_RALT = 307,
	KEY_LALT = 308,
	KEY_RMETA = 309,
	KEY_LMETA = 310,
	KEY_LSUPER = 311,
	KEY_RSUPER = 312,
	KEY_MODE = 313,
	KEY_COMPOSE = 314,

	KEY_LAST
};

//- KeyMod --------------------------------------------------------------------

enum KeyMod
{
	MOD_NONE	= 0x0000,
	MOD_LSHIFT	= 0x0001,
	MOD_RSHIFT	= 0x0002,
	MOD_LCTRL	= 0x0040,
	MOD_RCTRL	= 0x0080,
	MOD_LALT	= 0x0100,
	MOD_RALT	= 0x0200
};

//- MouseButton ---------------------------------------------------------------

enum MouseButton
{
	BUTTON_LEFT			= 1,
	BUTTON_MIDDLE		= 2,
	BUTTON_RIGHT		= 3,
	BUTTON_WHEELUP		= 4,
	BUTTON_WHEELDOWN	= 5
};

//- MouseButtonEvent ----------------------------------------------------------

struct MouseButtonEvent
{
	bool		pressed;
	int32		x, y;
	MouseButton	button;
};

//- MouseMotionEvent ----------------------------------------------------------

struct MouseMotionEvent
{
	int32		x, y;
	int32		dx, dy;
};

//- KeyboardEvent--------------------------------------------------------------

struct KeyboardEvent
{
	bool		pressed;
	KeyCode		key;
	KeyMod		mod;
};

} // namespace SkyID

#endif // SKYID_WINDOW_EVENT_H
